package com.detech.sbmh.base.hibernate.log.entity;

import javax.persistence.*;
import java.util.Date;
import java.util.Objects;

@Entity
@Table(name = "tb_log_p6spy")
public class TbLogP6Spy {
    private String id;
    private Date logTime;
    private int xhsj;
    private String ybySql;
    private String paramSql;
    private String xmmc;

    @Id
    @Column(name = "id")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "log_time")
    public Date getLogTime() {
        return logTime;
    }

    public void setLogTime(Date logTime) {
        this.logTime = logTime;
    }

    @Basic
    @Column(name = "xhsj")
    public int getXhsj() {
        return xhsj;
    }

    public void setXhsj(int xhsj) {
        this.xhsj = xhsj;
    }

    @Basic
    @Column(name = "yby_sql")
    public String getYbySql() {
        return ybySql;
    }

    public void setYbySql(String ybySql) {
        this.ybySql = ybySql;
    }

    @Basic
    @Column(name = "param_sql")
    public String getParamSql() {
        return paramSql;
    }

    public void setParamSql(String paramSql) {
        this.paramSql = paramSql;
    }

    @Basic
    @Column(name = "xmmc")
    public String getXmmc() {
        return xmmc;
    }

    public void setXmmc(String xmmc) {
        this.xmmc = xmmc;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TbLogP6Spy that = (TbLogP6Spy) o;
        return xhsj == that.xhsj &&
                Objects.equals(id, that.id) &&
                Objects.equals(logTime, that.logTime) &&
                Objects.equals(ybySql, that.ybySql) &&
                Objects.equals(paramSql, that.paramSql) &&
                Objects.equals(xmmc, that.xmmc);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, logTime, xhsj, ybySql, paramSql, xmmc);
    }
}
